package com.qf.exception.handler;

import com.qf.exception.AppException;
import com.qf.utils.ResultVoUtil;
import com.qf.vo.ResultVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class AppExceptionHandler {
    @ExceptionHandler(AppException.class)
    public ResultVo err(AppException ex){
        return ResultVoUtil.error(ex);
    }
}
